<?php include $this->getViewFile('/common/Head') ?>
<body class="J_scroll_fixed">
    <style>
        .col-left{float:left}
        .col-auto{overflow:hidden;_zoom:1;_float:left;}
        .title-1{border-bottom:1px solid #eee; padding-left:5px}
        .f14{font-size: 14px}
        .lh28{line-height: 28px}
        .blue,.blue a{color:#004499}
        .gray4,a.gray4{color:#999;}
        .lh22{line-height: 22px}
        .lh25{line-height: 25px}
        .lh30{line-height: 30px}
    </style>
    <div class="wrap J_check_wrap">
        <?php include $this->getViewFile('/common/Nav') ?>
        <div class="h_a">查找</div>
        <form method="post" action="" id="searchForm">
            <div class="search_type cc mb10">
                <div class="mb10">
                    审核人 ：
                    <?php
                    $adminList = array();
                    foreach (AdminUser::model()->getUserList() as $rs) {
                        $adminList[$rs['admin_id']] = $rs['real_name'];
                    }
                    ?>
                    <?php echo Form::select($adminList, $admin_id, 'name="admin_id"', '全部') ?>
                    关键字：<?php echo Form::select(array(1 => '商品ID', 3 => '商品旺旺', 4 => '订单编号'), $type, 'name="type"') ?>
                    <input type="text" class="input length_2" name="keyword" style="width:200px;" value="<?php echo $keyword ?>" placeholder="请输入搜索内容...">
                    <button class="btn">搜索</button>
                </div>
            </div>
        </form>
        <form method="post" action="<?php echo AdminBase::U('delete') ?>" name="deleteForm">
            <div class="search_type cc mb10">
                <div class="mb10">
                    订单创建时间：
                    <input type="text" name="start_time" class="input length_2 J_date" value="<?php echo $start_time ?>" placeholder="选择起始时间">                                      
                   <button class="btn btn_submit " type="submit"> 全部删除</button>
                </div>
            </div>
        </form>
        <div class="mb10"> 共有 ( <b><?php echo $count; ?></b> ) 个宝贝  
        </div>
        <form name="myform" action="<?php echo AdminBase::U("delete") ?>" method="post" class="J_ajaxForm">
            <div class="table_list">
                <table width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <td width="100" align="center"><input type="checkbox" class="J_check_all" data-direction="x" data-checklist="J_check_x">全选</td>
                            <td align="center">商品ID</td>
                            <td align="center">店铺名称</td>
                            <td align="center">佣金比例</td>
                            <td align="center">订单编号</td>
                            <td align="center">订单创建时间</td>
                            <td align="center">销量</td>
                            <td align="center">商品单价</td>
                            <td align="center">活动时间</td>
                            <td align="center">活动价格</td>
                            <td align="center">审核人员</td>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        foreach ($data as $rs) {
                            ?>
                            <tr>
                                <td width="100" align="center"><input type="checkbox" class="J_check" data-yid="J_check_y" data-xid="J_check_x" name="ids[]" value="<?php echo $rs->id; ?>" id="att_<?php echo $rs->id; ?>" /><?php echo $rs->id; ?></td>
                                <td align="center"><a href="http://item.taobao.com/item.htm?id=<?php echo $rs->product_id ?>" target="_blank"><?php echo $rs->product_id ?></a></td>
                                <td align="center"><?php echo $rs->shop_name ?><br/><a href="http://amos.im.alisoft.com/msg.aw?v=2&amp;site=cntaobao&amp;s=2&amp;charset=utf-8&amp;uid=<?php echo urlencode($rs->nick) ?>" target="_blank"><?php echo $rs->nick ?><img src="http://amos.im.alisoft.com/online.aw?v=2&amp;site=cntaobao&amp;s=2&amp;charset=utf-8&amp;uid=<?php echo urlencode($rs->nick) ?>" alt=""></a></td>
                                <td align="center"><?php echo $rs->brokerage_scale * 100 ?>%</td>
                                <td align="center"><?php echo $rs->orders_number ?></td>
                                <td align="center"><?php echo date('Y-m-d H:i:s', $rs->orders_create_time) ?></td>
                                <td align="center"><?php echo $rs->sales ?></td>
                                <td align="center"><?php echo $rs->price ?></td>
                                <td align="center">
                                    开始：<?php echo date('Y-m-d H:i:s', $rs->start_time) ?><br/>
                                    结束：<?php echo date('Y-m-d H:i:s', $rs->end_time) ?>
                                </td>
                                <td align="center"><?php echo $rs->promo_price ?></td>
                                <td align="center"><?php echo AdminUser::model()->getByUidFindName($rs->admin_id) ?></td>
                            </tr>
                            <?php
                        }
                        ?>
                    </tbody>
                </table>
                <div class="p10">
                    <div class="pages"><?php echo $Page; ?></div>
                </div>
            </div>
        </form>
    </div>
    <script src="<?php echo $staticUrl; ?>statics/js/common.js"></script>
</body>
</html>